package com.hand.demo.infra.repository.impl;

import org.apache.commons.collections.CollectionUtils;
import org.hzero.mybatis.base.impl.BaseRepositoryImpl;
import org.springframework.stereotype.Component;
import com.hand.demo.domain.entity.HhrTaProjExp;
import com.hand.demo.domain.repository.HhrTaProjExpRepository;
import com.hand.demo.infra.mapper.HhrTaProjExpMapper;

import javax.annotation.Resource;
import java.util.List;

/**
 * 项目经历表(HhrTaProjExp)资源库
 *
 * @author
 * @since 2025-06-16 12:16:52
 */
@Component
public class HhrTaProjExpRepositoryImpl extends BaseRepositoryImpl<HhrTaProjExp> implements HhrTaProjExpRepository {
    @Resource
    private HhrTaProjExpMapper hhrTaProjExpMapper;

    @Override
    public List<HhrTaProjExp> selectList(HhrTaProjExp hhrTaProjExp) {
        return hhrTaProjExpMapper.selectList(hhrTaProjExp);
    }

    @Override
    public HhrTaProjExp selectByPrimary(Long id) {
        HhrTaProjExp hhrTaProjExp = new HhrTaProjExp();
        hhrTaProjExp.setId(id);
        List<HhrTaProjExp> hhrTaProjExps = hhrTaProjExpMapper.selectList(hhrTaProjExp);
        if (hhrTaProjExps.size() == 0) {
            return null;
        }
        return hhrTaProjExps.get(0);
    }

}

